#include "Thread.hpp"
#include <stdio.h>
#include<memory>
#include<unordered_map>
#include<vector>
#define NUM 10

/*void count(int count)
{
    while(count--)
    {
        std::cout<<count<<std::endl;
        sleep(1);
    }

}*/
class student
{
 public:
    student(std::string name):_name(name)
    {}

    ~student()
    {}
public:
    std::string _name;
    int _year = 10;
};

void count(student st)
{
    while(st._year--)
    {
        std::cout << "我的名字是: "<<st._name<<", 我今年: "<< st._year <<"岁了."<< std::endl;
        sleep(1);
    }

}

int main()
{
    student a("张忠昊");
    ThreadModule::Thread<student> t(count,a);
    std::vector< ThreadModule::Thread<student>>;

    t.Start();

    t.Join();

    return 0;
}